<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="/ztqphp/bbs/Public/Admin/css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="/ztqphp/bbs/Public/Admin/css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="/ztqphp/bbs/Public/Admin/lib/font-awesome/font-awesome.min.css" rel="stylesheet" type="text/css" />
<!--[if IE 7]>
<link href="lib/font-awesome/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<link href="/ztqphp/bbs/Public/Admin/lib/iconfont/iconfont.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>回答管理</title>
</head>
<body>
<nav class="breadcrumb"><i class="iconfont">&#xf012b;</i> 首页 <span class="c-gray en">&gt;</span> 回答管理 <span class="c-gray en">&gt;</span> 回答列表 <a class="btn btn-success radius r mr-20" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="icon-refresh"></i></a></nav>
<div class="pd-20">
  <div class="text-c"> 日期范围：
    <input type="text" onfocus="WdatePicker('2016-07-01')" id="datemin" class="input-text Wdate" style="width:120px;">
    -
    <input type="text" onfocus="WdatePicker('2016-07-06')" id="datemax" class="input-text Wdate" style="width:120px;">
    <input type="text" class="input-text" style="width:250px" placeholder="输入问题关键字" id="" name=""><button type="submit" class="btn btn-success" id="" name=""><i class="icon-search"></i> 搜答案</button>
  </div>
  <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"><a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="icon-trash"></i> 批量删除</a></span> <span class="r">共有数据：<strong><?php echo $count; ?></strong> 条</span> </div>
  <table class="table table-border table-bordered table-hover table-bg table-sort">
    <thead>
      <tr class="text-c">
        <th width="25"><input type="checkbox" name="" value=""></th>
        <th width="80">ID</th>
        <th width="100">用户名</th>
        <th width="40">标题</th>
        <th width="90">问题内容</th>
        <th width="150">回答内容</th>
        <th width="130">回答时间</th>
        <th width="70">状态</th>
        <th width="100">操作</th>
      </tr>
    </thead>
    <tbody>
    <?php foreach ($res as $v) { ?>
      <tr class="text-c">
        <td><input type="checkbox" value="1" name=""></td>
        <td><?php echo $v['aaid']; ?></td>
        <td><u style="cursor:pointer" class="text-primary"><?php echo $v['username']; ?></u></td>
        <td><?php echo $v['title']; ?></td>
        <td><a style="text-decoration:none" class="ml-5" href="<?php echo U('admin/question/content',array('id'=>$v['qid']));?>" title="查看内容">查看内容</a></td>
        <td><a style="text-decoration:none" class="ml-5" href="<?php echo U('admin/answer/content',array('id'=>$v['aaid']));?>" title="查看内容">查看内容</a></td>
        <td class="text-l"><?php echo $v['create_time']; ?></td>
        <td class="user-status"><?php if ($v['status']==0) { echo '<span class="label radius">未回复</span>'; }else{ echo '<span class="label label-success radius">已回复</span>'; } ?></td>
        <td class="f-14 user-manage"><?php if ($v['status']==1) { ?>
          <a title="停用" href="<?php echo U('admin/question',array('id'=>$v['id']));?>" class="ml-5" style="text-decoration:none"><i class="icon-hand-down"></i>
          </a> 
        <?php }else{ ?>
          <a title="启用" href="<?php echo U('admin/question',array('id'=>$v['id']));?>" class="ml-5" style="text-decoration:none"><i class="icon-hand-up"></i>
          </a>
        <?php } ?>
        
        <a title="编辑" href="<?php echo U('admin/answer/edit',array('id'=>$v['id']));?>" class="ml-5" style="text-decoration:none"><i class="icon-edit"></i></a> <a style="text-decoration:none" class="ml-5" onClick="user_password_edit('10001','600','240','修改密码','user-password-edit.html')" href="javascript:;" title="修改密码"><i class="icon-key"></i></a> <a title="删除" href="<?php echo U('admin/answer/del',array('id'=>$v['id']));?>" onclick="if(confirm('确定是否要删除用户')){ this.href='<?php echo U('admin/answer/del',array('id'=>$v['id']));?>'}" class="ml-5" style="text-decoration:none"><i class="icon-trash"></i></a></td>
      </tr>
    <?php } ?>
      
    </tbody>
  </table>
  
</div>
<div><?php echo $show; ?></div>
<script type="text/javascript" src="/ztqphp/bbs/Public/Admin/lib/jquery.min.js"></script> 
<script type="text/javascript" src="/ztqphp/bbs/Public/Admin/lib/layer1.8/layer.min.js"></script> 
<script type="text/javascript" src="/ztqphp/bbs/Public/Admin/lib/laypage/laypage.js"></script> 
<script type="text/javascript" src="/ztqphp/bbs/Public/Admin/lib/My97DatePicker/WdatePicker.js"></script> 
<script type="text/javascript" src="/ztqphp/bbs/Public/Admin/lib/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/ztqphp/bbs/Public/Admin/js/H-ui.js"></script>  
<script type="text/javascript" src="/ztqphp/bbs/Public/Admin/js/H-ui.admin.js"></script>
<script type="text/javascript" src="/ztqphp/bbs/Public/Admin/js/H-ui.admin.doc.js"></script>
<script type="text/javascript">


/*用户-删除*/
// function user_del(obj,id){
//   layer.confirm('确认要删除吗？',function(index){
//     $(obj).parents("tr").remove();
//     layer.msg('已删除!',1);
//   });
// }

/*用户-删除*/
// function user_dels(obj,id) {
//   layer.confirm('确认要删除吗？',function(index){
//     var userid = id;
//     var currentobj = $(obj);
//     var layerobj = layer;
//     $.ajax({
//       url: "<?php echo U('admin/user/del');?>",
//       type: 'POST',
//       dataType: 'json',
//       data: {theuserid: userid},
//       success:function(data) {
//         currentobj.parents("tr").remove();
//         layer.msg('已删除!',1);
//       },
//       error:function(){

//       }
//     })
//   });
// }

</script> 
<script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "//hm.baidu.com/hm.js?080836300300be57b7f34f4b3e97d911";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F080836300300be57b7f34f4b3e97d911' type='text/javascript'%3E%3C/script%3E"));
</script>
</body>
</html>